package com.plug.listener;

import com.plug.common.jdbc.JDBCBaseDao;
import com.plug.common.quartz.QuartzManager;
import com.plug.common.quartz.job.QuartzJob;
import com.plug.common.spring.utils.ApplicationContextHelper;
import com.plug.common.spring.utils.SpringUtils;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.Properties;

/**
 * Created by slayes on 2017/1/10.
 */
public class QuartzListener implements ServletContextListener {
    @Override
    public void contextInitialized(ServletContextEvent sce) {

    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        try {
            QuartzManager.shutdownJobAll();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
